package org.wk.user.dao;

import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.wk.core.db.dao.GenericJpaRepository;
import org.wk.user.domain.UserSuggestions;

import java.util.List;

/**
 * @author TangShenShen
 * @Description: 意见反馈dao
 * @date 2018/5/29 16:46
 */
public interface UserSuggestionsDao extends GenericJpaRepository<UserSuggestions, String> {

    @Modifying
    @Query(value = "update s_user_suggestions a set a.del_flag = :delFlag where a.id in (:sugIds)", nativeQuery = true)
    void updateDelFlagByIds(@Param(value = "delFlag") String delFlag, @Param(value = "sugIds") List<String> sugIds);
}
